// 生产环境配置
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const { merge } = require("webpack-merge");
const common = require("./webpack.common");
const prod = true
module.exports = merge(common, {
  mode: "production",
  plugins: [
    // 自动清除输出目录
    new CleanWebpackPlugin(),
    // 复制 public 文件夹下的文件至 dist 目录
    new CopyWebpackPlugin({
      patterns: [
          {
              from: 'public',
          }
      ],
    })
  ]
})